import React, { Component } from 'react';
import ErrorBoundary from './components/ErrorBoundary';
import CodePush from 'react-native-code-push';
import { Provider } from 'react-redux';
import configureStore from './store/configureStore';
import Router from './router';
const store = configureStore();

// global.__STORE__ = store;
@CodePush({ checkFrequency: CodePush.CheckFrequency.MANUAL })
class App extends Component {
  componentDidMount() {}

  onAppRestart = () => {};

  render() {
    return (
      <Provider store={store}>
        <ErrorBoundary onAppRestart={this.onAppRestart}>
          <Router />
        </ErrorBoundary>
      </Provider>
    );
  }
}

export default App;
